Skip to content

Comments

Mx bluesky 1598 mod 360#1929

Draft
rtuck99 wants to merge 5 commits intomainfrom
mx-bluesky_1598_mod_360
Draft

Mx bluesky 1598 mod 360#1929
rtuck99 wants to merge 5 commits intomainfrom
mx-bluesky_1598_mod_360

Conversation

@rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Feb 19, 2026

Required for

Introduces a mod_360_motor parameter to the init method for XYZOmegaStage; when set to True this replaces the standard omega motor with an instance of ModMotor which delegates motion to the underlying omega motor with the difference that the omega values are remapped to 0<=omega<360.

When making an absolute move on the ModMotor:

  • The motor will never do a real movement more than 180 degrees
  • For moves to absolute positions which appear (from the ModMotor readback) to be less than 180 degrees from the current position, the real motor will always move in the same direction as implied by the apparent move.

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 90.56604% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.01%. Comparing base (ec5fc8d) to head (0b9b9f5).

Files with missing lines Patch % Lines
src/dodal/devices/motors.py 90.38% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1929      +/-   ##
==========================================
- Coverage   99.05%   99.01%   -0.04%     
==========================================
  Files         312      312              
  Lines       11754    11804      +50     
==========================================
+ Hits        11643    11688      +45     
- Misses        111      116       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oliwenmandiamond
Copy link
Contributor

Sorry to jump in here, but I am working on a StandardMovable in ophyd-async which looks like a perfect use case for your ModMotor and caught my eye. Allows us to create Motor like things in a standard way. bluesky/ophyd-async#1200

Secondly, I don't think you should be altering the existing XYZOmegaStage. It will make the type ModMotor | Motor which isn't a good idea when this isn't standard behaviour for beamline stages. This is MX specific behaviour, therefore you should create a specific one like ModMotorXYZOmegaStage for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants